package com.alinu.web.filter;

import javax.servlet.*;
import java.io.IOException;

/**
 * @author chenzuwei
 * @date 2021/3/15
 * @description
 */
public class EncodingFilter implements Filter {
    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        request.setCharacterEncoding("UTF-8");
        response.setContentType("text/html;charset=utf-8");

        chain.doFilter(request, response);
    }
}
